#ifndef GUDAYWELLWIDGET_H
#define GUDAYWELLWIDGET_H

#include <QtSql>
#include <QTableView>

class QString;
class GudaywellWidget: public QTableView
{
	Q_OBJECT
	public:
		GudaywellWidget(QString table,QWidget *parent=0);
	signals:
		void modified();
	public slots:
		void addRow();
		void delRow();
		void refresh();
	private:
		QSqlRelationalTableModel *model;
		void beforeInsert(QSqlRecord &record);
		QString table;
		void initializeModel();
	private slots:
		void beforeDelete();
};
#endif
